#include <iostream>
#include <vector>
#include <numeric>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
using namespace std;
using namespace boost;

int main()
{
    cout << "--- Start ---" << endl;
    vector<int> vec; 
    using namespace boost::assign;
    vec += 2, 3, 1, 4, 2;
    int acc = accumulate(vec.begin(), vec.end(), 0.0,
            bind(plus<int>(), _1, bind(multiplies<int>(), _2, _2)));
    cout << "acc = " << acc << endl;
    cout << "--- End ---" << endl;
    return 0;
}
